<template>
	<view class="page-items">
		<block v-for="(item, index) in items" :key="index">
			<!-- 图片组 -->
			<block v-if="item.type === 'image'">
				<Images :item="item" />
			</block>
			<!-- 搜索框 -->
			<block v-if="item.type === 'search'">
			  <Search :item="item" />
			</block>
			<!-- 功能模块 -->
			<block v-if="item.type === 'slide'">
			  <Function/>
			</block>
			<!-- 轮播图 -->
			<block v-if="item.type === 'slide'">
			  <Banner :item="item" />
			</block>
			<!-- 辅助线 -->
			<block v-if="item.type === 'space'">
			  <Guide :item="item" />
			</block>
			<!-- 显示数据 -->
			<block v-if="item.type === 'statistics'">
			  <statis :item="item" />
			</block>
			<!-- 公告 -->
			<block v-if="item.type === 'notice'">
			  <Notice :item="item"/>
			</block>
			<!-- 标题 -->
			<block v-if="item.type === 'title'">
			  <Title :item="item"/>
			</block>
			<!-- 视频 -->
			<block v-if="item.type === 'video'">
			  <Video :item="item"/>
			</block>
			<!-- 图文列表 -->
			<block v-if="item.type === 'pictxt'">
			  <Pictxt :item="item"/>
			</block>
			<!-- 分类导航 -->
			<block v-if="item.type === 'fenlei'">
			  <Fenlei :item="item"/>
			</block>
		</block>
	</view>
</template>

<script>
	import Notice from './notice'
	import Search from './search'
	import Images from './image'
	import Banner from './banner'
	import Guide from './guide'
	import statis from './statis'
	import Title from './title'
	import Video from './video'
	import Pictxt from './pictxt'
	import Fenlei from './fenlei'
	import Function from './function'
	export default {
		components: {
			Images,
			Search,
			Banner,
			Guide,
			statis,
			Notice,
			Title,
			Video,
			Pictxt,
			Fenlei,
			Function
		},
		name: "Page",
		data() {
			return {

			};
		},
		props: {
			items: {
				type: Array,
				default () {
					return []
				}
			}
		},
		created() {
			setTimeout(() => {
				console.log(this.items)
			}, 1000)
		},
	}
</script>

<style lang="less">

</style>
